package org.wikinews.en.wikinewsreader;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;

public class About extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
               
                /** Coded this dynamically, no need for XML */
                /** Use a LinearLayout and set it to vertical */
                ScrollView sv = new ScrollView(this);
                LinearLayout ll = new LinearLayout(this);
                ll.setOrientation(LinearLayout.VERTICAL);
                sv.addView(ll);
                
                /** Open a new TextView, make the text be 'about_text' from string*/
                /** Then add it to the view 'tv'*/
                TextView tv = new TextView(this);
                tv.setText (getResources().getString(R.string.about_text));
                ll.addView(tv); 
                
                /** You can also use above method to add buttons, and everything else*/

                /** Obviously set the content view to sv, the ScrollView*/
                this.setContentView(sv);
        }
}